#include <allegro5\allegro.h>
#include <allegro5\allegro_primitives.h>
#include <allegro5\allegro_image.h>
#include "sw_game_map.h"
#include "sw_game_state_main.h"
#include "globals.h"

#include "sw_sprite_enemy.h"

sw_sprite_enemy::sw_sprite_enemy(float x, float y) : sw_sprite(0x0) {
	bitmap = al_load_bitmap("images/sprite_enemy.png");
	al_convert_mask_to_alpha(bitmap, al_map_rgb(255, 0, 255));
}

sw_sprite_enemy::~sw_sprite_enemy() {
	al_destroy_bitmap(bitmap);
}

void sw_sprite_enemy::compute_time_step() {
	sw_sprite::compute_time_step();
}

ALLEGRO_BITMAP* sw_sprite_enemy::get_bitmap() {
	return bitmap;
	//al_draw_bitmap(bitmaps[frame_count/5], top_left_x, top_left_y, 0);
	//if (attacking) {
	//	int tipx = direction ? top_left_x+width*3/2 : top_left_x-width;
	//	al_draw_line(top_left_x+width/2, top_left_y+height/2, tipx, top_left_y+height/2, al_map_rgb(0, 0, 255), 2);
	//}
	//al_draw_filled_rectangle(top_left_x, top_left_y, top_left_x+width, top_left_y+height, al_map_rgb(0, 0, 255));
}